package day03;

import util.杨霸天系列;

import java.awt.*;
import java.awt.image.BufferedImage;
import java.util.Random;

public class love_home extends Frame {

    杨霸天系列 a = new 杨霸天系列();
    BufferedImage img;
    Random rd = new Random();
    int x=100,y= -100,size=100;
    public  void start() throws InterruptedException {
        x=rd.nextInt(1680);
        y=0 - rd.nextInt(900);
        size = rd.nextInt(100)+10;
        img = a.图片("/image/timg.png");
        setSize(size,size);
        setUndecorated(true); //取消装饰
        setAlwaysOnTop(true);
        setBackground(new Color(0,0,0,0));   //背景透明色
        setVisible(true);   //展示
        for (;;){
            if(y > 900){
                y = -100;
            }
            setLocation(x,y);
            y+=2;
            Thread.sleep(20);
        }
    }

    @Override
    public void paint(Graphics g) {
        g.drawImage(img,0,0,size,size,null);

    }

    public static void main(String[] args) throws InterruptedException {
        for (int i=1;i<=100;i++){
            new more_open().start();
        }
    }
}
